<?php

$email_id = $path[3];

if (ctype_digit($email_id)) {
	
	$email = $db->fetchRow("SELECT * FROM cms_email_log WHERE site_id=? AND id=?", array($site['id'], $email_id));
	$smarty->assign('email', $email);
	$smarty->display('global/email-log/view.tpl.html');
	
} else {
	$_SESSION['messages'][] = array('title' => 'Error', 'body' => "No email ID was provided.");
	header("Location: /admin/global/email-log/");
}
